home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: presby.edu!jtbell
- From: jtbell@presby.edu (Jon Bell)
- Subject: Re: Which is better????
- Message-ID: <Dos016.4qK@presby.edu>
- Date: Sun, 24 Mar 1996 14:24:41 GMT
- References: <3155559E.7120@dial.pipex.com>
- Organization: Presbyterian College, Clinton, South Carolina USA
-
- <gs94@dial.pipex.com> wrote:
- >I have a project where data is passed between functions, as is fairly normal in a
- >C++ program. What I would like to know is:
- >
- >Which is better / faster, passing data by pointers or by reference, e.g.
-
- There shouldn't be any difference in speed between pointers and
- references. References are just pointers that you can't "re-point" to
- something else, and that are automatically dereferenced whenever you use
- them.
-
- --
- Jon Bell <jtbell@presby.edu> Presbyterian College
- Dept. of Physics and Computer Science Clinton, South Carolina USA
-